<template>
  <div class="login-form">
    <el-form ref="form" :model="form" label-width="60px" style="margin: 0 auto;">
      <el-form-item label="用户名" style="color: white;">
        <el-input v-model="form.name"></el-input>
      </el-form-item>
      <el-form-item label="密码">
        <el-input v-model="form.password"></el-input>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="onSubmit">登录</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
  export default {
    data() {
      return {
        form: {
          name: '',
          password: ''
        }
      }
    },
    methods: {
      onSubmit() {
        console.log('submit!');
      }
    }
  }
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
.login-form{
  background: rgba(164,237,239,0.6);
  padding: 20px 20px 10px 10px;
  height: 174px;
  width: 320px;
  border-radius: 4px;
  position: absolute;
  top: 50%;
  margin-top: -87px;
  left: 50%;
  margin-left: -160px;
}

@media screen and (max-width: 998px) {

}
</style>
<style>
  .login-form .el-form-item__label{
    color: black;
  }
  .login-form .el-button{
    margin-left: 62px;
  }

</style>
